/**
 * 
 */
package com.cplsystems.incidencias.business;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author César Palalía López (csr.plz@aisa-automation.com)
 * 
 */
@Entity
@Table
public class DependenciasEconomicas implements Serializable {

	private static final long serialVersionUID = -9139231386025797252L;
	private Long idDependenciaEconomica;
	private Integer noPersonas;
	private String parentesco;
	private Persona persona;

	@Id
	@Column
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getIdDependenciaEconomica() {
		return idDependenciaEconomica;
	}

	public void setIdDependenciaEconomica(Long idDependenciaEconomica) {
		this.idDependenciaEconomica = idDependenciaEconomica;
	}

	@Column
	public Integer getNoPersonas() {
		return noPersonas;
	}

	public void setNoPersonas(Integer noPersonas) {
		this.noPersonas = noPersonas;
	}

	@Column
	public String getParentesco() {
		return parentesco;
	}

	public void setParentesco(String parentesco) {
		this.parentesco = parentesco;
	}

	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
	@JoinColumn(name = "persona")
	public Persona getPersona() {
		return persona;
	}

	public void setPersona(Persona persona) {
		this.persona = persona;
	}

}
